package com.ruibang.glass.quality.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruibang.glass.quality.domain.req.DefectLossReq;
import com.ruibang.glass.quality.domain.req.EverydayDefectLossReq;
import com.ruibang.glass.quality.entity.EverydayDefectLoss;
import com.ruibang.glass.quality.entity.HotColdRate;
import com.teaming.cloud.framework2.autoconfigure.mybatisplus.mapper.CommonMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EverydayDefectLossMapper extends CommonMapper<EverydayDefectLoss> {

    IPage<EverydayDefectLoss> queryEverydayDefectLoss(IPage<EverydayDefectLoss> page, @Param("lossReq") EverydayDefectLossReq everydayDefectLossReq);

    List<EverydayDefectLoss> queryNotUpdateData();

    List<String> getAllTimeKey();

    List<HotColdRate> queryHotLoss(@Param("lossReq") DefectLossReq defectLossReq);

    List<HotColdRate> queryColdLoss(@Param("lossReq") DefectLossReq defectLossReq);

    List<HotColdRate> queryTotalLoss(@Param("lossReq") DefectLossReq defectLossReq);

    void deleteDayData(@Param("lossReq") DefectLossReq defectLossReq);
}
